package io.wins.vertx.service;

import io.vertx.core.Vertx;
import io.vertx.core.eventbus.Message;
import io.vertx.core.json.JsonObject;
import io.wins.vertx.entity.Customer;
import io.wins.vertx.entity.CustomerAddress;
import io.wins.vertx.service.impl.CustomerServiceImpl;

public interface CustomerService {

    String SERVICE_ADDRESS = "customer.service";
    static CustomerService create(final Vertx vertx) {return new CustomerServiceImpl(vertx);}

    CustomerService delCustAddress(final String id, final Message tMessage);
    CustomerService listCustAddress(final String custId, final Message tMessage);
    CustomerService saveCustAddress(final CustomerAddress ca, final Message tMessage);
    CustomerService createCustAddress(final CustomerAddress ca, final Message tMessage);
    CustomerService setDefaultAddress(final String id, final String custId, final Message tMessage);

    void loadCustomer(String id, Message<JsonObject> tMessage);

    void delCustomer(String id, Message<JsonObject> tMessage);

    void updateCustomer(Customer customer, Message<JsonObject> tMessage);

    void listCustomer(Message<JsonObject> tMessage);
}
